enum Direction {
    Up='UP',
    Down='DOWN',
    Left='LEFT',
    Right='RIGHT'
}
console.log(Direction.Up);
console.log(Direction['Up']);

// 基础的实现逻辑
const value = 'UP'
if(value === Direction.Up){ 
    console.log('go up!');
}